package com.ssy.lingxi.product.controller;

import com.ssy.lingxi.common.controller.BaseController;
import com.ssy.lingxi.product.service.es.ISyncEsCommodityService;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * 数据初始化类
 * @author jw.chen
 * @version 2.0.0
 * @date 2021/12/16
 */
@RestController
@RequestMapping("/product/sync")
public class SyncController extends BaseController {

    @Resource
    private ISyncEsCommodityService syncEsCommodityService;

    /**
     * 初始化会员商品信息到es
     */
    @RequestMapping(value = "/syncCommodity", method = RequestMethod.GET)
    public void syncCommodity() {
        syncEsCommodityService.syncCommodity();
    }

    /**
     * 初始化渠道商品信息到es
     */
    @RequestMapping(value = "/syncChannelCommodity", method = RequestMethod.GET)
    public void syncChannelCommodity() {
        syncEsCommodityService.syncChannelCommodity();
    }


}
